package com.example.demo.service.impl;

import com.example.demo.dao.MemberDao;
import com.example.demo.pojo.Member;
import com.example.demo.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberServiceImpl  implements MemberService {

    @Autowired
    private MemberDao memberDao;

    //新增会员
    @Override
    public int insert(Member member) {
        return memberDao.insertSelective(member);
    }

    @Override
    public List<Member> selectAll() {
        return memberDao.selectAll();
    }
    //根据用户查看会员信息
    @Override
    public Member selectByUid(Integer Uid) {
        return memberDao.selectByUid(Uid);
    }

    @Override
    public int deleteByPrimaryKey(Integer memberid) {
        return memberDao.deleteByPrimaryKey(memberid);
    }
}
